﻿using Abp.Domain.Repositories;
using AppFramework.DinosaursParkMes.DictionariesModel.IService;
using Abp.Domain.Repositories;
using AppFramework.DinosaursParkMes.DictionariesModel.IService;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AppFramework.DinosaursParkMes.DictionariesModel.Service
{
    public class DictionariesService : AppFrameworkDomainServiceBase, IDictionariesService
    {
        private readonly IDictionariesRepository  dictionariesRepository;
        private readonly IRepository<Dictionaries> repository;

        public DictionariesService(IDictionariesRepository dictionariesRepository, IRepository<Dictionaries> repository)
        {
            this.dictionariesRepository = dictionariesRepository;
            this.repository = repository;
        }

        public async Task<List<Dictionarieslist>> GetDictionary(string  DicId)
        {
            return await dictionariesRepository.GetDictionary(DicId);
        }

        public async Task<Dictionaries> InsertDictionary(Dictionaries dictionary)
        {
            dictionary = await dictionariesRepository.InsertDictionary(dictionary);
            return dictionary;
        }
    }
}
